﻿using System.Windows;

namespace Ncmis.Client.Explorer
{
    /// <summary>
    /// Interaction logic for InputWindow.xaml
    /// </summary>
    public partial class InputWindow : Window
    {
        /// <summary>
        /// Sets the caption of the Input Window.
        /// </summary>
        public string Caption
        {
            set { Title = value; }
        }

        /// <summary>
        /// Sets the prompt text of the Input Window.
        /// </summary>
        public string Promt
        {
            set { promtLabel.Content = value; }
        }

        /// <summary>
        /// Gets the user entered text.
        /// </summary>
        public string Text
        {
            get { return inputTextBox.Text; }
        }

        /// <summary>
        /// Creates a new instance of InputWindow.
        /// </summary>
        public InputWindow()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Cancels the actions.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cancelButton_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = false;
        }

        /// <summary>
        /// Confirms the action.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void okButton_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = true;
        }
    }
}
